<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用户中心</title>
	<link rel="stylesheet" type="text/css" href="../../static/news/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/jquery.pagination.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/main.css">
    <script type="text/javascript" src="../../static/news/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="../../static/news/js/jquery.pagination.min.js"></script>
</head>
<body class="inframe_body">
    <div class="my_collect">
        <h3>我的收藏</h3>
        <ul class="article_list">
            {% for news in data.collections %}
                {# target="_blank"表示在新窗口中打开链接
                _blank -- 在新窗口中打开链接
                _parent -- 在父窗体中打开链接
                _self -- 在当前窗体打开链接,此为默认值
                _top -- 在当前窗体打开链接，并替换当前的整个窗体(框架页) #}
                <li><a href="/news/{{ news.id }}" target="_blank">{{ news.title }}</a><span>{{ news.create_time }}</span></li>
            {% endfor %}
            
{#            <li><a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a><span>2018-1-17</span></li>#}
        </ul>



        <div id="pagination" class="page"></div>
        <script>
            $(function() {
                {# 调用分页函数pagination， current为点击的页码 #}
                $("#pagination").pagination({
                    currentPage: {{ data.current_page }},
                    totalPage: {{ data.total_page }},
                    callback: function(current) {
                    window.location.href = "/profile/collected_info?p=" + current
                    }
                });
            });
        </script>

    </div>
</body>
</html>